package com.example.dockercompose.controller;

import com.example.dockercompose.dao.Kafka;
import com.example.dockercompose.dao.Redis;
import com.example.dockercompose.dao.TestDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    private Logger logger = LoggerFactory.getLogger(TestController.class);

    @RequestMapping("test")
    public String test() {
        logger.info("mysql begin");
        new TestDao().test();
        logger.info("mysql end");

        logger.info("redis begin");
        new Redis().pubSub();
        logger.info("redis end");

        logger.info("kafka begin");
        new Kafka().pubSub();
        logger.info("kafka end");
        return "test";
    }
}
